package com.glamour.hlcity.common.data.model;

import java.util.List;
import java.util.Map;

import com.glamour.hlcity.common.enums.ClassifiedEnum;
import com.glamour.hlcity.common.model.Node;
import com.glamour.hlcity.common.util.ListUtil;

/**
 * 线索节点
 * @author zhaoxing.liuzx
 *
 */
public class ClueNode {

	/**
	 * 父亲节点
	 */
	private ClueNode parent;
	
	/**
	 * 子节点
	 */
	private List<ClueNode> childList;
	
	/**
	 * 顺序 
	 */
	private Integer siber;
	
	/**
	 * 层次 level
	 */
	private Integer level;
	
	/**
	 * Node 构建
	 */
	private Map<ClassifiedKey,List<Node>> nodeMap;
	
	/**
	 * 所有的节点列表
	 */
	private List<Node> nodeList;

	public ClueNode getParent() {
		return parent;
	}

	public void setParent(ClueNode parent) {
		this.parent = parent;
	}

	public List<ClueNode> getChildList() {
		return childList;
	}

	public void setChildList(List<ClueNode> childList) {
		this.childList = childList;
	}

	public Integer getSiber() {
		return siber;
	}

	public void setSiber(Integer siber) {
		this.siber = siber;
	}

	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	public Map<ClassifiedKey, List<Node>> getNodeMap() {
		return nodeMap;
	}

	public void setNodeMap(Map<ClassifiedKey, List<Node>> nodeMap) {
		this.nodeMap = nodeMap;
	}

	public List<Node> getNodeList() {
		return nodeList;
	}

	public void setNodeList(List<Node> nodeList) {
		this.nodeList = nodeList;
	}  
	
	/**
	 * 新增一个节点
	 * @param node
	 */
	public void addNode(Node node){
		if(nodeList==null){
			nodeList=ListUtil.emptyList();
		}
		nodeList.add(node);
	}
	
}
